<template>
  childSonInject: {{ childSonInject }}
</template>

<script setup>
import {inject, onMounted} from "vue";
import eventBus from "../utils/eventBus.js";
import useUserStore from "../store/modules/user.js";

const childSonInject = inject('parentProvideMsg')

onMounted(() => {
  eventBus.on('msg', (val) => {
    console.log(val)
  })
})


const userStore = useUserStore()
console.log('childSon: ' + JSON.stringify(userStore.userInfo))

</script>

<style scoped>

</style>